#!/usr/bin/python
# -*- coding:utf-8 -*-
# @author  : micah
# @time    :  
# @function: 
# @version :

int_list = [1, 2, 3, 4, 5]
# a = int_list[0]
# b = int_list[1]
# c = int_list[2]
# d = int_list[3]
# e = int_list[4]
#
# print(a, b, c, d, e)

# 1.变量位置需要和元素位置对应
# 2.变量个数需要和元素个数对应
b, c, d, e, a = int_list
print(a, b, c, d, e)

# 元组
int_tuple = (1, 2, 3, 4)
a, b, c, d = int_tuple
print(a, b, c, d)

# 集合拆包
info = {"name": "micah", "age": 23}
a, b = info.values()
print(a, b)
# for 循环是最常用的一张字典拆包，将key--k，value--v
for k, v in info.items():
    print(k, v)


# 当前有两个变量，a, b
a = 1
b = 2
a, b = b, a
print(a, b)
